/**
 * 
 */
package edu.umd.clip.lm.model;

import edu.umd.clip.lm.util.*;
import edu.umd.clip.lm.factors.*;

/**
 * @author Denis Filimonov <den@cs.umd.edu>
 *
 */
public interface AbstractProbTree {
//	public ProbTree getProbTree();
	public Boolean testOvertFactors(long factors);
	/**
	 * tests whether how the cuttingPrefix will cut the tree
	 * @param cuttingPrefix
	 * @return TRUE if the tree is a subtree of the cuttingPrefix, 
	 *         FALSE if there's no intersection between the tree and cuttingPrefix,
	 *         null if the cuttingPrefix can cut the tree (the intersection may still be empty because of pruning)  
	 */
	public Boolean testCut(BinaryPrefix cuttingPrefix);
	/**
	 * Chops a subtree identified by cuttingPrefix off the ProbTree
	 * @param cuttingPrefix
	 * @return the subtree cut, null if nothing has been cut, returns this if all leaves are cut
	 */
	public ProbTree cut(BinaryPrefix cuttingPrefix);
	/**
	 * @return the overtFactors
	 */
//	public Factors getOvertFactors();
	/**
	 * @return the wordPrefix
	 */
	public BinaryPrefix getWordPrefix();
	/**
	 * @return the prefix
	 */
	public BinaryPrefix getPrefix();
	/**
	 * @return the cuts
	 */
//	public HashSet<BinaryPrefix> getCuts();
	/**
	 * @return the tuple
	 */
	public long getTuple();
//	public void setTuple(long tuple);
	//public BinaryPrefix getRoot();
	public double getTotalProb();
/*
	public double getScale();
	public double getTreeProb();
	public void scale(double scale);
	public float fromBackoff();
	public void setFromBackoff(float fromBackoff);
	public AbstractCompactProbTree getTree();
	public void setTree(AbstractCompactProbTree tree);
*/	
	public Object clone();
	
	public ProbTree getProbTree();
	public void scale(double scale);
}
